Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes observers able to see the UI of Xeno players (and also action buttons) #5751

Merged
merged 6 commits into from
Feb 21, 2024

Conversation

SabreML
Copy link
Member

@SabreML SabreML commented Feb 18, 2024

About the pull request

Makes auto-observing work for xenomorphs and humans by moving it to /carbon, and also makes it show the target's action buttons.

I'm pretty confident that this all works correctly, but I would still recommend testmerging it anyway.
It's probablepossible that I missed something somewhere and an observer could get stuck being unable to click anything, or something like that.

Explain why it's good for the game

This makes auto-observing a bit more consistent, more interesting for observers, and could actually help newer players to learn how to play some castes. (Which abilities to use and when, where to target, etc.)

Testing Photographs and Procedure

Screenshots & Videos
output.mp4

Changelog

🆑
add: Added 'observe' functionality to Xenomorphs, allowing observers to view the target's UI.
add: Made observing a player also show their action buttons.
/:cl:

Seems to already work surprisingly well with the xeno HUD (I'll test it more though).
also added something to the tips pool because I had no idea about it
@github-actions github-actions bot added the Feature Feature coder badge label Feb 18, 2024
code/_onclick/observer.dm Outdated Show resolved Hide resolved
code/modules/mob/living/carbon/human/human.dm Show resolved Hide resolved
@SabreML SabreML marked this pull request as draft February 19, 2024 16:41
Made `/mob/living/carbon/human/auto_observed()` just get the target's active inventory rather than looping through their contents.
Also made build mode not show to observing players.
Not sure why I didn't just do this in the first place...
@SabreML SabreML marked this pull request as ready for review February 20, 2024 23:52
cm13-github added a commit that referenced this pull request Feb 21, 2024
@harryob harryob added this pull request to the merge queue Feb 21, 2024
Merged via the queue into cmss13-devs:master with commit 8caa8b9 Feb 21, 2024
27 checks passed
cm13-github added a commit that referenced this pull request Feb 21, 2024
github-merge-queue bot pushed a commit that referenced this pull request Feb 24, 2024
# About the pull request

Fixes/tweaks a couple of auto-observe things that I noticed after #5751.
Specifically:
- Fixes `runtime error: client_screen_add overridden. Use override =
TRUE to suppress this warning`/`runtime error: client_screen_remove
overridden. Use override = TRUE to suppress this warning`.
*This error was consistently thrown when a ghost who's body is being
observed re-enters their body. `observe_target_new_mind()` tries to
re-register the some signals on the body's new client, but didn't have
the `override` argument set.*

- Stops 'hidden' actions being added to the screen of observing players.
(e.g. the xeno tacmap action if the queen isn't ovied)

- Makes any observers transfer over to the new body when a xenomorph
evolves/de-evolves.
*(I also added `/mob/dead/observer` to the `observers` variable's
declaration since it wasn't particularly clear what the list held.)*

- Fixes the target player's action buttons disappearing for observers if
they reconnect or re-enter their body.
*(The actions were being shown to the player in
`Login()`>`show_hud()`>`update_action_buttons()` before the observer
could re-register signals in `observe_target_login()`.)
In order to fix this I renamed the existing `COMSIG_GLOB_MOB_LOGIN`,
`COMSIG_CLIENT_MOB_LOGIN`, `COMSIG_MOB_LOGIN` signals, and made
`COMSIG_MOB_LOGIN` send a bit earlier in the proc.*

# Explain why it's good for the game

Bugfixes :)


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog
:cl:
fix: Fixed 'hidden' action buttons being shown to observing players.
qol: Made any observers transfer over when a Xenomorph
evolves/de-evolves.
/:cl:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Feature coder badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants